package com.tequila.api.controller;

import com.tequila.core.service.OAuthService;
import fe.core.ApiResponse;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * Created by fe on 2017/6/30.
 */
@RestController
@RequestMapping("/oauth")
public class OAuthController {

    @Resource
    private OAuthService oAuthService;

    private ApiResponse getAccessToken(String code) {
        return ApiResponse.successApiResponse().withData(oAuthService.getWechatAccessToken(code));
    }
}
